﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace CSharpTest.Migrations
{
    /// <inheritdoc />
    public partial class init : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "app_school",
                columns: table => new
                {
                    id = table.Column<int>(type: "INT", nullable: false)
                        .Annotation("Dm:Identity", "1, 1"),
                    name = table.Column<string>(type: "NVARCHAR2(32767)", nullable: false),
                    address = table.Column<string>(type: "NVARCHAR2(32767)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_app_school", x => x.id);
                });

            migrationBuilder.CreateTable(
                name: "app_user",
                columns: table => new
                {
                    id = table.Column<int>(type: "INT", nullable: false)
                        .Annotation("Dm:Identity", "1, 1"),
                    name = table.Column<string>(type: "NVARCHAR2(32767)", nullable: false),
                    gender = table.Column<string>(type: "NVARCHAR2(32767)", nullable: false),
                    birthday = table.Column<DateTime>(type: "TIMESTAMP", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_app_user", x => x.id);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "app_school");

            migrationBuilder.DropTable(
                name: "app_user");
        }
    }
}
